from django.urls import path
from app_backend import views

app_name = 'backend'
urlpatterns = [
    path('', views.backend, name='backend'),
    path('<str:condition>/del/<int:pk>/', views.delete, name='delete'),
    path('add/adv/', views.AddAdv.as_view(), name='add_adv'),
    # 管理分类和标签 根据condition区分
    path('manage/<str:condition>/', views.manageCategory, name='manage'),
    # 回收站
    path('recycle/', views.recycleBin, name='recycle'),
    # 撤销
    path('revoke/<int:pk>/', views.revoke, name='revoke'),
    # 编辑分类
    path('edit/category/', views.EditCategoryTag.as_view(), name='editCategoryTag'),
    path('edit/advertisement/', views.EditAdvertisement.as_view(), name='editAdvertisement'),
    path('add/<str:condition>/', views.AddCategoryTag.as_view(), name='addCategoryTag'),
]
